package com.wll.ppjoke.model;

//import androidx.camera.core.AspectRatio;
//import androidx.camera.core.CameraSelector;
import androidx.camera.core.ImageCapture;
import androidx.databinding.BaseObservable;
import androidx.databinding.Bindable;
//import androidx.databinding.library.baseAdapters.BR;

import java.io.Serializable;

/**
 * created by detachment on 2020/11/15
 */
public class CameraConfig extends BaseObservable implements Serializable {
//    public int mFlashMode = ImageCapture.FLASH_MODE_AUTO;
//    public int mRatio = AspectRatio.RATIO_16_9;
//    public int mFacing = CameraSelector.LENS_FACING_BACK;
//
//    @Bindable
//    public int getmFlashMode() {
//        return mFlashMode;
//    }
//
//    public void setmFlashMode(int mFlashMode) {
//        if (mFlashMode == ImageCapture.FLASH_MODE_AUTO) {
//            this.mFlashMode = ImageCapture.FLASH_MODE_ON;
//        } else if (mFlashMode == ImageCapture.FLASH_MODE_ON) {
//            this.mFlashMode = ImageCapture.FLASH_MODE_OFF;
//        } else {
//            this.mFlashMode = ImageCapture.FLASH_MODE_AUTO;
//        }
//        notifyPropertyChanged(BR._all);
//    }
//
//    @Bindable
//    public int getmRatio() {
//        return mRatio;
//    }
//
//    public void setmRatio(int mRatio) {
//        if (mRatio == AspectRatio.RATIO_16_9){
//            this.mRatio = AspectRatio.RATIO_4_3;
//        } else {
//            this.mRatio = AspectRatio.RATIO_16_9;
//        }
//        notifyPropertyChanged(BR._all);
//    }
//
//    @Bindable
//    public int getmFacing() {
//        return mFacing;
//    }
//
//    public void setmFacing(int mFacing) {
//        if (mFacing == CameraSelector.LENS_FACING_BACK){
//            this.mFacing = CameraSelector.LENS_FACING_FRONT;
//        } else {
//            this.mFacing = CameraSelector.LENS_FACING_BACK;
//        }
//        notifyPropertyChanged(BR._all);
//    }
//
//    @Override
//    public String toString() {
//        return "CameraConfig{" +
//                "mFlashMode=" + mFlashMode +
//                ", mAspectRatioInt=" + mRatio +
//                ", mCameraSelectorInt=" + mFacing +
//                '}';
//    }
}
